package com.gy.service;

import com.gy.mapper.UserMapper;
import com.gy.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

//service层调mapper层
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;
    @Override
    public User selectUserById(String name) {
        return userMapper.selectUserById(name);
    }

    @Override
    public void addUser(String name, String pwd) {
        userMapper.addUser(name,pwd);
    }



    @Override
    public void updatePerm(Map<String, Object> map) {
        userMapper.updatePerm(map);
    }

    @Override
    public List<User> allUser() {
        return userMapper.allUser();
    }

    @Override
    public void updatepwd(String name,String pwd) {
        userMapper.updatepwd(name,pwd);
    }

    @Override
    public void deleteuser(int id) {
        userMapper.deleteuser(id);
    }

    @Override
    public String selectpwd(String name) {
        return userMapper.selectpwd(name);
    }

    @Override
    public String selectPerm(String name) {
        return userMapper.selectPerm(name);
    }


}
